-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install buildifier via Bazel #2777
Conversation
946be0a
to
9a68e92
Compare
9a68e92
to
16d364a
Compare
Based on @danlapid's suggestion, I added some code to let |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
f60d34d
to
348c80f
Compare
What I meant with my comment re. config_setting_group was to still have them to define an alias for the binary with the right architecture, but to define the groups in a new file in the build folder and use that to fold up the groups that we have so far in rust-deps/BUILD.bazel. That feels cleaner than doing platform selection in python, but I assume that would cause issues with running the binary directly instead of through bazel, so not opposed to this approach. |
348c80f
to
95f6484
Compare
@fhanau Yep, your suggestion makes sense, but I wanted direct running of the binary to speed things up where possible. |
95f6484
to
e72ce73
Compare
# formatter=prettier, | ||
# ), | ||
# FormatConfig(directory="src", globs=("*.json",), formatter=prettier), | ||
FormatConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restoring prettier because it is already installed by bazel
# globs=("*.bzl", "WORKSPACE", "BUILD", "BUILD.*"), | ||
# formatter=buildifier, | ||
# ), | ||
FormatConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restoring buildifier because this PR installs it via Bazel
# formatter=prettier, | ||
# ), | ||
# FormatConfig(directory="src", globs=("*.json",), formatter=prettier), | ||
FormatConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was prettier intended to be included? Imo it requires running npm install
or something and is not fetched automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's listed as a runtime dependency of workerd, so it's somewhere... I'm currently doing a clean build to find out where it puts it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it (bazel-bin/node_modules/prettier/bin/prettier.cjs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. I have #2775 in the works that will hopefully make managing these easier.
I thought about this too, and while it can be done I don't see a particular value of doing it that way. You'll have to do |
* Install buildifier via Bazel * Update path to prettier * Update path to prettier
No description provided.